#include <stdio.h>
int n = 0;

int MySqrt(int x,int spring){
	int temp = x;
	int doub = temp*temp;
	if(doub == spring||doub - spring < 1||spring - doub < 1) return temp;
	else if(doub > spring) {
		n++;
		return MySqrt((int)(temp /2),spring);
	}
	else {
		n++;
		return MySqrt((int)(temp+(temp /2)),spring);
	}
}

int main(){
	int num;
	scanf("%d",&num);
    printf("%d\n", MySqrt(num,num));
	return 0;
}